/******************************************************************************
* File description: SettingModelConfigChangePwd.qml
* Function: 设置-模型配置：修改密码
* Current Version: 1.0.0
* Author: 张宇轩
* Date: 2024-08-31
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14

Item {
    id: root

    /* property 定义开始 */

    // 信号
    signal cancel()
    /* property 定义结束 */

    ColumnLayout {
        anchors.fill: parent

        // 内容部分
        Item {
            Layout.fillWidth: true
            Layout.fillHeight: true
            Layout.leftMargin: 16
            Layout.rightMargin: 16

            LabelTextInput {
                id: pwdInput
                width: parent.width
                inputWidth: width
                inputHeight: height
                height: 40
                anchors {
                    centerIn: parent
                }
                labelText: "新密码"
            }

            Label {
                font.pixelSize: 16
                color: "#FF999999"
                text: "请输入6位数字或字母"
                anchors {
                    top: pwdInput.bottom
                    left: pwdInput.left
                    topMargin: 9
                    leftMargin: pwdInput.getLabelSize()[0] + pwdInput.colSpacing
                }
            }
        }

        // 按钮部分
        Item {
            Layout.fillWidth: true
            Layout.preferredHeight: 40
            Layout.topMargin: 40
            Layout.bottomMargin: 40

            RowLayout {
                anchors.fill: parent
                spacing: 8

                CustomHorSpacerItem {}

                PureButton {
                    id: cancelBtn
                    pureText: "取消"
                    onReleased: {
                        root.cancel()
                    }
                }

                GradientButton {
                    id: submitBtn
                    gradText: "确定"
                }

                CustomHorSpacerItem {}
            }
        }
    }
}
